/** bootstrap IBRPG **/
/** this brings in all the other libraries and gets things going **/

var theHead = document.getElementsByTagName('head')[0];

var theResources = [
    {url:"http://yui.yahooapis.com/2.5.1/build/yuiloader-dom-event/yuiloader-dom-event.js",type:"js"},
    {url:"http://yui.yahooapis.com/2.5.1/build/container/assets/skins/sam/container.css",type:"css"},
    {url:"http://ittybittyrpg.com/dojostorage/dojo/dojo.js", type: "js"},
    {url:"http://ittybittyrpg.com/dojostorage/dojox/storage/storage-browser.js",type:"js"},
    {url:"http://ittybittyrpg.com/magenta/js/ibrpg_startup.js",type:"js"}
];

(function(){
    var resLen = theResources.length;
	for(i = 0; i < resLen; i++){
		var item = theResources[i];
		if(item.type === "js"){
			var newScript = document.createElement('script');
			newScript.setAttribute('src',item.url);
			theHead.appendChild(newScript);
		}else{
			if(item.type === "css"){
				var newStyle = document.createElement('link');
				newStyle.setAttribute('href',item.url);
				newStyle.setAttribute('rel','stylesheet');
				newStyle.setAttribute('type','text/css');
				theHead.appendChild(newStyle);
			}
		}
	}


})();
